	*************************************************************************************************************
	* Inter-regional Inequality and the Dynamics of Government Spending 
	* Online Appendix -- Section 2. The Articulation of Inter-regional Inequality within Political Institutions
	*************************************************************************************************************
	clear all
	set more off 
	set mem 600m
	cd "YOUR_DIRECTORY_PATH_HERE\supplements (online appendix)\appendix d"
	use "onlineappendix.dta"   

 	**************************************
	** Rescaling / modifying variables                                
	**************************************
	replace adgini = adgini*100
	replace inflationcon = inflationcon*100	
    collapse(mean) adgini rpop_s1_rgdppc inflationcon (max) PR, by(id countries countrycode electionyear)
	drop if electionyear==.
	tsset id electionyear
    
	*************************
	** Renaming variables 
	*************************
	rename inflationcon PST 
	rename adgini RDGINI
	rename rpop_s1_rgdppc MM_RATIO
	
	********************************************************************************************
	** Appendix D. Summary of Correlation Matrix (All Election Years across 22 OECD Countries)
	********************************************************************************************
	pwcorr PST RDGINI MM_RATIO if PR!=., star(.05) bonferroni obs sig
	pwcorr PST RDGINI MM_RATIO if PR >=1, star(.05) bonferroni obs sig
	pwcorr PST RDGINI MM_RATIO if PR >=2, star(.05) bonferroni obs sig

	spearman PST RDGINI MM_RATIO if PR!=., star(.05) pw bonferroni stats(rho obs p)
	spearman PST RDGINI MM_RATIO if PR >=1, star(.05) pw bonferroni stats(rho obs p)
	spearman PST RDGINI MM_RATIO if PR >=2, star(.05) pw bonferroni stats(rho obs p)	
	
